import React, { Component } from 'react'; 
import ReactDOM from 'react-dom';

class GroceryList2 extends Component {
	render() {
		return (
			<ul>
				<ListItem quantity="1">Bread</ListItem>
				<ListItem quantity="6">Eggs</ListItem>
				<ListItem quantity="2">Milk</ListItem>
			</ul>
		);
	}
}

class ListItem extends Component {
	render() {
		return (
			<li>{this.props.quantity}x {this.props.children}</li>
		);
	}
}

ReactDOM.render(<GroceryList2 />, document.getElementById("list_test"));
